//mock
import axios from "axios";

//创建axios实例
const service = axios.create({
  baseURL:
    "https://www.fastmock.site/mock/797b5e04b28684b296937da97e193b08/api",
  timeout: 5000,
});

//导出封装的get和post方法
export function get(url: string, params?: object) {
  return service.get(url, { params });
}

export function post(url: string, data: object) {
  return service.post(url, data);
}
